Week 5 R-Markdown Practice

Testing Math

x<-2
y<-5

print(x+y)
## [1] 7
# Load necessary libraries
library(ggplot2)
library(plotly)
## 
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
## 
##     last_plot
## The following object is masked from 'package:stats':
## 
##     filter
## The following object is masked from 'package:graphics':
## 
##     layout
# Create some fake data
set.seed(123)
fake_data <- data.frame(
  Year = rep(2000:2020, each = 5),
  Site = rep(letters[1:5], times = 21),
  Sponge_Abundance = rnorm(105, mean = 50, sd = 10)
)

# Create a plot using ggplot
p <- ggplot(fake_data, aes(x = Year, y = Sponge_Abundance, color = Site)) +
  geom_line() +
  labs(title = "Sponge Abundance Over Time",
       x = "Year",
       y = "Sponge Abundance") +
  theme_minimal()

# Convert ggplot to plotly for interactivity
ggplotly(p)

Graphs

Lets Try to put some graphs into this section

# Load necessary libraries
library(ggplot2)

# Create some fake data
set.seed(123)
fake_data <- data.frame(
  Year = rep(2000:2020, each = 5),
  Site = rep(letters[1:5], times = 21),
  Sponge_Abundance = rnorm(105, mean = 50, sd = 10)
)

# Create a plot
ggplot(fake_data, aes(x = Year, y = Sponge_Abundance, color = Site)) +
  geom_line() +
  labs(title = "Sponge Abundance Over Time",
       x = "Year",
       y = "Sponge Abundance") +
  theme_minimal()

Commentss

Adding comments you can also at add comments that do not show up on your HTML by pressing command+shift+C

References

manuscript reference

(Aronson et al. 2000)

Aronson, Richard B., William F. Precht, Ian G. Macintyre, and Thaddeus J. T. Murdoch. 2000. “Coral Bleach-Out in Belize.” Nature 405 (6782): 36–36. https://doi.org/10.1038/35011132.